<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../../resource/dhtmlx/calender/codebase/calendar.css">
    <script src="../../resource/dhtmlx/calender/codebase/calendar.js"></script>
    <script src="../../js/jquery-3.4.1.js"></script>
    <style>
        .zero-height-calendar {
            position: relative;
            height: 0;
        }
    </style>
</head>
<body>
<section class="dhx_sample-container">
    <label>请选择日期</label>
    <div style="width: 250px; height: 15px; overflow: hidden;" id="cal_div">
        <input type="text" id="end_time" style="width: 250px;"/>
        <div class="zero-height-calendar">
            <div class="dhx_sample-container__widget" id="calendar"></div>
        </div>
    </div>
</section>

<script>

    var calendar = new dhx.Calendar("calendar", {
        // 可以通过value属性设置默认值
        value: new Date(2019, 0, 12)
        , css: "dhx_widget--bordered"
        // 这样就是默认设置方式
        , dateFormat: "%Y/%m/%d"
        , width: 250
    });

    $(function () {
        $("#end_time").focus(function () {
            $("#cal_div").css("overflow", "auto");
        }).blur(function () {
            $("#cal_div").css("overflow", "hidden");
        });
    })

</script>

</body>
</html>